<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('yp', 'header'); ?>
<div id="main">
  <div id="right">
    <div id="position"><strong>当前位置：</strong><a href="yp/">企业黄页</a><a href="yp/job.php">企业招聘</a>职位信息</div>
    <div class="mar_10">
        <h1 id="p_name"><?php echo $rs['title'];?><?php if(($rs['updatetime']+3600*24*$rs['period'] < time())) { ?>   [ 已过期 ]<?php } ?></h1><span class="two_button"></a><a href="javascript:void(0)" onclick="javascript:postapply(<?php echo $jobid;?>);"><img src="templates/default/yp/images/job_join.gif" /></a><a href="javascript:void(0)" onclick="javascript:favorapply(<?php echo $jobid;?>);"><img src="templates/default/yp/images/job_shou.gif" /></a></span>
    </div>
    <div class="clear"></div>
    <div class="pro_intro">
<p>
<?php echo $rs['content'];?>
</p>
      <table cellpadding="0" cellspacing="1" width="700" class="table_2">
        <tr>
          <th>招聘人数</th>
          <td><?php echo intval($rs['employ']);?>人</td>
          <th>工作性质</th>
          <td><?php echo $rs['worktype'];?></td>
        </tr>
        <tr>
          <th>性别要求</th>
          <td><?php echo $rs['sex'];?></td>
          <th>学历要求</th>
          <td><?php echo $rs['degree'];?></td>
        </tr>
        <tr>
          <th>薪资</th>
          <td><?php if($rs['pay']) { ?><?php echo $rs['pay'];?>元/月<?php } else { ?>面议<?php } ?></td>
          <th>工作地点</th>
          <td><?php echo $rs['workplace'];?></td>
        </tr>
<tr>
          <th>发布时间</th>
          <td><?php echo date("Y.m.d",$rs['inputtime']);?></td>
          <th>有效期</th>
          <td><?php echo $rs['period'];?>天</td>
        </tr>
      </table>
    </div>
    <div class="bk_10"></div>
    <div class="tit_1">
      <h3>公司联系方式</h3>
    </div>
    <div class="clear"></div>
    <div>
      <div class="f_r" style="width:400px;">
        <ul class="d_list">
          <li>　公司名称：<?php echo $c['companyname'];?></li>
  <li>　　联系人：<?php echo $c['linkman'];?></li> 
  <li>　联系电话：<?php echo magic_image($c['telephone']);?></li> 
  <li>　电子邮箱：<?php echo magic_image($c['email']);?></li> 
          <li>　公司类型：<?php echo $c['genre'];?></li>
          <li>　　地　址：<?php echo $c['address'];?></li>          
          <li>　公司网站：<a href="<?php echo company_url($c['userid']);?>"><?php echo company_url($c['userid']);?></a></li>
  <li>　<a href="<?php echo company_url($c['userid']);?>">查看公司详情</a></li>
        </ul>
      </div>
      <div class="f_l"><img src="<?php echo $c['logo'];?>" alt="公司标志" width="240" onerror="this.src='images/nopic_small.gif'"/></div>
      <div class="clear"></div>
    </div>
  </div>
  <div id="left">
    <div class="box_t">
      <h3>职位分类列表</h3>
    </div>
    <div class="box_c">
      <table width="222" border="0" cellspacing="0" cellpadding="0" class="table_list">
<?php $DATA = get("SELECT count(*) AS number,j.station,t.name FROM phpcms_yp_job j,phpcms_type t WHERE t.typeid = j.station AND j.status = '99' GROUP BY station ORDER BY t.listorder DESC", 0, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<tr>
<td><a href="<?php echo job_list_url(0,$r['station'],0);?>"><?php echo $r['name'];?></a>（<?php echo $r['number'];?>）</td>
</tr>
<?php } unset($DATA); ?>  
</table>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>最新更新简历</h3>
    </div>
    <div class="box_c">
      <ul class="text_list">
        <?php $DATA = get("SELECT truename,applyid,specialty FROM `phpcms_yp_apply` WHERE status = '3' ORDER BY edittime DESC", 15, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li><a href="yp/apply.php?applyid=<?php echo $r['applyid'];?>"><?php echo $r['truename'];?></a> <?php echo $r['specialty'];?></li>
<?php } unset($DATA); ?>
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
  </div>
</div>
<script type="text/javascript">
var postapply =  function(jobid)
{
$.get("<?php echo $M['url'];?>myjob.php",{'action':'postapply','jobid':jobid,'ran':Math.random()},function(data){if(data == '-2')alert('非法参数');else if(data == "-1")alert('请先建立您的简历');else if(data == "1")alert("简历投递成功");else if(data == '0') alert("您已经申请过这个职位了");else if(data == '-3') alert("这个职位已经过期了");else{alert('请您先登录');$(":text[name='username']").select();}});
}

var favorapply =  function(jobid)
{
$.get("<?php echo $M['url'];?>myjob.php",{'action':'favorapply','jobid':jobid,'ran':Math.random()},function(data){if(data == '-2')alert('非法参数');else if(data == "-1")alert('请先建立您的简历');else if(data == "1")alert("职位收藏成功");else if(data == '0')  alert("您已经收藏过这个职位了");else{alert('请您先登录');$(":text[name='username']").select();}});
}
</script>
<?php include template('yp', 'footer'); ?>
